﻿using System;
using System.Collections;
using System.Linq;
using System.Text;

namespace DiamondDesktop.Presenters
{
    class Config
    {
        public static readonly string FALSE = "false";
        public static readonly string TRUE = "true";

        public static readonly string CONFIG_FILE_NAME = "config.cfg";
        public static readonly string DATA_FILE_NAME = "data";
        public static readonly string LAST_USE_TIME = "last use time";
        public static readonly string POSTFIX = ".DD";

        public static readonly string REMIND_ON_START = "remind on start";
        public static readonly string REMIND_ON_CLOSE = "remind on close";
        public static readonly string DATAPATH = "datapath";
        public static readonly string SOUND_PATH = "sound_path";
        public static readonly string DEFAULT_SOUND = "default sound";
        public static readonly string SYSTEM_CHECKTIME = "system check time";

        public static readonly string REMIND_ON_START_VALUE = "true";
        public static readonly string REMIND_ON_CLOSE_VALUE = "true";
        public static readonly string DATAPATH_VALUE = "";
        public static readonly string SOUND_PATH_VALUE = "sound/";
        public static readonly string DEFAULT_SOUND_VALUE = "Audiom.wav";
        public static readonly int SYSTEM_CHECKTIME_VALUE = 10;

        private static Hashtable table = new Hashtable();
        private static bool setTable = false;
        public static Hashtable defaults()
        {
            if (!setTable)
            {
                table.Add(REMIND_ON_START, REMIND_ON_START_VALUE);
                table.Add(REMIND_ON_CLOSE, REMIND_ON_CLOSE_VALUE);
                table.Add(DATAPATH, DATAPATH_VALUE);
                table.Add(SOUND_PATH, SOUND_PATH_VALUE);
                table.Add(DEFAULT_SOUND, DEFAULT_SOUND_VALUE);
                table.Add(SYSTEM_CHECKTIME, SYSTEM_CHECKTIME_VALUE);
                setTable = true;
            }
            return table;
        }

    }
}
